package org.linlinjava.litemall.admin.service;

import org.linlinjava.litemall.db.domain.LitemallGoodsAccessoryGroup;
import org.linlinjava.litemall.db.service.LitemallGoodsAccessoryGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 管理商品配件组服务
 *
 * @author yliyun
 * @date 2022/09/14
 */
@Service
public class AdminGoodsAccessoryGroupService {
    /**
     * litemall商品配件组服务
     */
    @Autowired
    private LitemallGoodsAccessoryGroupService litemallGoodsAccessoryGroupService;

    /**
     * 添加
     *
     * @param goodsAccessoryGroup 产品配件组
     */
    public void add(LitemallGoodsAccessoryGroup goodsAccessoryGroup){
        litemallGoodsAccessoryGroupService.add(goodsAccessoryGroup);
    }

    /**
     * 列表名字
     *
     * @param accessoryGroupName 附件组名称
     * @return {@link List}<{@link LitemallGoodsAccessoryGroup}>
     */
    public List<LitemallGoodsAccessoryGroup> listByName(String accessoryGroupName){
        return litemallGoodsAccessoryGroupService.findByName(accessoryGroupName);
    }
}
